clear all
addpath ../../Generator
addpath ../../Generator/GrTheory
addpath ../../PDCO
addpath ../../CRNTSolvers

%Generate a random single linkage class and try 
%to converge to the fixed point of the mapping
m = 5;
n = 50;
r = 3;

%Set the seed to be able to reproduce the experiment
%RandStream.setDefaultStream(RandStream('mt19937ar','seed',2));
%Generate a random set of n complexes on n species, each with at most 3 species
Y = YGenerator(m,n,r);
%Generate the strongly connected graph with a single linkage class`
Ak = AkGenerator(n,0.2,1);

%Extract the matrices to generate an inhomogeneous term in the
%range of YAk. 
d  = diag(Ak);
At = Ak - diag(d);


% We will have to find etaPlus and etaMinus anyway so it makes
% sense to generate b = YAtetaPlus - YDetaMinus, and generate etaPlus and etaMinus 
% strictly positive and random.

etaPlus  = abs(randn(n,1))+1.e-5*ones(n,1); 
etaMinus = abs(randn(n,1))+1.e-5*ones(n,1);

b 		 = Y*(At*etaPlus-d.*etaMinus);  
b		 = b/norm(b);
etaPlus  = etaPlus/norm(b);
etaMinus = etaMinus/norm(b);

save 'typicalInhomogeneous.mat' etaPlus etaMinus Y Ak 
